<template>
  <div id="app">
    <k-table :data="tableData">
      <k-table-column prop="date" label="⽇期" sortable> </k-table-column>
      <k-table-column prop="name" label="姓名"> </k-table-column>
      <k-table-column prop="address" label="地址"> </k-table-column>
      <k-table-column label="操作">
        <template slot-scope="scope">
          {{ scope.row.operation }}
        </template>
      </k-table-column>
    </k-table>
  </div>
</template>
<script>
import KTable from './KTable'
import KTableColumn from './KTable-column'
export default {
  name: 'App',
  components: {
    KTable,
    KTableColumn,
  },
  data() {
    return {
      tableData: [
        {
          date: '2016-05-02',
          name: '王⼩⻁',
          address: '上海市普陀区⾦沙江路 1518 弄',
          operation: '添加'
        },
        {
          date: '2016-05-04',
          name: '王⼩⻁',
          address: '上海市普陀区⾦沙江路 1517 弄',
          operation: '删除'
        },
        {
          date: '2016-05-01',
          name: '王⼩⻁',
          address: '上海市普陀区⾦沙江路 1519 弄',
          operation: '修改'
        },
        {
          date: '2016-05-03',
          name: '王⼩⻁',
          address: '上海市普陀区⾦沙江路 1516 弄',
          operation: '查找'
        },
      ],
    }
  },
}
</script>
